﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BulldogCMS.Core.Storage.Providers
{
    public interface IContentTreeProvider
    {
        IEnumerable<Node> GetRootNodes(long? nodeID = null);
        IEnumerable<Node> GetNodes(Node parentNode);
        Node GetNode(string currentProviderPath, string name, long parentNodeID);
        void SetParameter(string name, string value);
        NodeVersion GetNodeVersion(Node node, string languageIdent, int versionNumber);

        bool ReadOnly
        {
            get;
        }

        // editing
        Node CreateNewNode(Node node);
        Node UpdateNode(Node node);
        void DeleteNode(Node node);

        NodeVersion CreateNewVersion(Node node, NodeVersion newVersion);
        NodeVersion UpdateVersion(Node node, NodeVersion updatedVersion);
        NodeVersion DeleteVersion(Node node, NodeVersion versionToBeDeleted);
    }
}